<div class="content">
	<div class="div-top">
		<span style="font-size: 20px;float:left;">{{menu_name}}</span>
		<div style="float:right;">
			<button ng-repeat="but in buttons" ng-click="update()" class="btn btn-{{but.style}}"><i class="iconfont {{but.img}}"></i>&nbsp;{{but.name}}</button>
		</div>
	</div>

	<form class="div-find form-inline">
		<div class="form-group">
			<label class="form-label">学年：</label>
			<select class="form-control" ng-options="aca.prop_pk as aca.prop_value for aca in academics" ng-model="form.academic" ng-change="findClass()">
				<option value="">==请选择==</option>
			</select>
			<label class="form-label">学期：</label>
			<select class="form-control" ng-options="sem.prop_pk as sem.prop_value for sem in semesters" ng-model="form.semester" ng-change="findClass()">
				<option value="">==请选择==</option>
			</select>
		</div>
		<div class="form-group" style="position: relative;">
			<label class="form-label">学校：</label>
			<input type="text" placeholder="==请选择学校==" readonly="readonly" ng-model="gzdwname" class="form-control" style="width: 300px; background: #fff;" ng-click="showul(1)">
			<ul class="ss-ul gzdw ss-display">
				<li><input type="text" placeholder="学校名称" ng-model="gname" class="form-control" style="width: 100%; line-height: 40px;" ng-change="gnames=gname"></li>
				<li ng-click="getSchool(0)">==请选择==</li>
				<li ng-repeat="school in unitList | filter:{name:gnames}" ng-model="apply_school" ng-click="getSchool(school)">{{school.name}}</li>
			</ul>
		</div>
		<div class="form-group">
			<label class="form-label">年级：</label>
			<select class="form-control" ng-options="grade.id as grade.name for grade in gradeList" ng-model="form.fk_grade" ng-change="findClass()">
				<option value="">==请选择==</option>
			</select>
		</div>
		<div class="form-group">
			<label class="form-label">班级：</label>
			<select class="form-control" ng-options="class.id as class.name for class in classList" ng-model="form.fk_class" ng-change="find()">
				<option value="">==请选择==</option>
			</select>
		</div>
		<div class="form-group" ng-if = "form.weekunit == '1' && form.weekunit != undefined">
			<label class="form-label">单/双周：</label>
			<select class="form-control"  ng-model="form.week" ng-change="find()">
				<option value="">==请选择==</option>
				<option value="1">单周</option>
				<option value="2">双周</option>
			</select>
		</div>
		<!-- <button ng-click="update()" type="button" class="btn btn-dark"><i class="iconfont icon-set"></i>&nbsp;设置</button> -->
	</form>



	<!-- Table -->
	<div class="div-table">
		<div class="panel panel-primary">
			<!-- Default panel contents -->
			<div class="panel-heading" style="background: none;text-align: center;">
				<span style="font-weight: bold;color:#333;">课程表</span>
			</div>

			<!-- Table -->
			<table class="table table-bordered" style="text-align: center;">
				<thead>
				<tr>
					<td colspan="2"><span ng-if="form.week != 'undefined' && form.week != undefined"><span ng-if="form.week == ''">单/双</span><span ng-if="form.week == '0'">无单双</span><span ng-if="form.week == '1'">单</span><span ng-if="form.week == '2'">双</span>周</span></span></td>
					<!-- <td colspan="2"><span ng-if="form.week != 'undefined' && form.week != undefined && form.week != ''"><span ng-if="form.week == '1'">单</span><span ng-if="form.week == '2'">双</span>周</span></span></td> -->
					<td>星期一</td>
					<td>星期二</td>
					<td>星期三</td>
					<td>星期四</td>
					<td>星期五</td>
				</tr>
				</thead>
				<tbody>
				<tr ng-if="dataList.length == 0">
					<td colspan="100" class="NoSelectHistory" align="left">查询无记录</td>
				</tr>
				<tr ng-repeat='row in dataList' ng-click="optData($event.currentTarget)">
					<td ng-if="0 == $index" rowspan="{{row.forenoon}}" valign="middle">上<br/>午</td>
					<td ng-if="row.forenoon == $index" rowspan="{{row.afternoon}}" valign="middle">下<br/>午</td>
					<td ng-if="row.forenoon+row.afternoon == $index" valign="middle"></td>
					<td>{{row.course_time}}</td>
					<td>{{row.course_table1}}</td>
					<td>{{row.course_table2}}</td>
					<td>{{row.course_table3}}</td>
					<td>{{row.course_table4}}</td>
					<td>{{row.course_table5}}</td>
				</tr>
				</tbody>
			</table>
		</div>
	</div>
</div>